from django.db import models
from django.db.models import permalink

import capabilities

class Technology(models.Model):
    """
    A technology
    """
    name = models.CharField(max_length=100)
    slug = models.SlugField(unique=True)
    description = models.TextField()
    url = models.URLField()
    order = capabilities.models.OrderField()
    primary_technology = models.BooleanField(default=True)
    
    class Meta:
        ordering = ['order']
        
    @permalink
    def get_absolute_url(self):
        return ('t_ch_technology', [str(self.slug)])
    
    def __unicode__(self):
        return self.name 
    